This section provides background information related to the present disclosure which is not necessarily prior art.
At present an embedded system device may be controlled by software to enter standby or to be awoken.
The system enters standby through controlling a high or low level output from a General Purpose Input Output (GPIO) to cut off a power supply to a part of peripherals while keeping a general power supply to the system, and lowering an operating frequency of the system so that the system enters sleep state, i.e., standby mode; and the system is awoken by controlling the high or low level output from the GPIO to resume the power supply to the peripherals, and resuming the operating frequency of the system gradually for the purpose of awaking the system.
Here before the power supply to the peripherals is cut off, threads in a master process of the embedded system release their occupied resource respectively, and the process starts a standby thread so that the standby thread controls the power supply to the peripherals to be cut off. If any thread fails to release the occupied system resource, then it may result in a failure to enter standby or unstableness of the system after being awoken.